package com.hhss.qishi.entity.system;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

import com.hhss.qishi.entity.common.BasePojo;
/**
 * 权限表
 * @author Administrator
 *
 */
@Table(name = "sys_permission")
public class Permission extends BasePojo{

	private static final long serialVersionUID = 2432126727201031812L;
	
	/**
	 * 父id
	 * -1为顶级
	 */
	@Column(name = "pid")
	private Long pid;
	
	/**
	 * 权限名称
	 */
	@NotEmpty
	@Column(name = "permission_name")
	private String permissionName;
	
	/**
	 * 类型
	 * 暂定 菜单or功能
	 */
	@Column(name = "permission_type")
	private String permissionType;
	
	/**
	 * 权限文本
	 * 比如菜单时存url，功能时存add、delete等操作名
	 */
	@Column(name = "permission_text")
	private String permissionText;
	
	/**
	 * 排序
	 */
	@Column(name = "sort")
	private String sort;

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getPermissionName() {
		return permissionName;
	}

	public void setPermissionName(String permissionName) {
		this.permissionName = permissionName;
	}

	public String getPermissionType() {
		return permissionType;
	}

	public void setPermissionType(String permissionType) {
		this.permissionType = permissionType;
	}

	public String getPermissionText() {
		return permissionText;
	}

	public void setPermissionText(String permissionText) {
		this.permissionText = permissionText;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}
	
}